package com.lagou.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lagou.pojo.Account;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @Authther: mrwu
 * @date:2021/3/12-03
 * @Description:com.lagou.mapper
 */
//设置使用mybatis plus 插件
public interface AccountMapper extends BaseMapper<Account> {
    //通过cardno查询账户
    @Select("select * from account where cardNo=#{cardNo}")
    public Account selectObjByCardNo(String cardNo);

    @Update("update account set name=#{name},money=#{money} where cardNo=#{cardNo}")
    public int updateAccountBycardNo(Account account);
}
